import request from '@/utils/request'

// 获取题目分类列表
export function getQuestionCategoryList(params) {
    return request({
        url: '/api/questionCategory/page',
        method: 'get',
        params
    })
}

// 获取题目分类题目数量
export function getCountQuestionsByCategory(params) {
    return request({
        url: '/api/questionCategory/category/count',
        method: 'get',
        params
    })
}

// 添加题目分类
export function addQuestionCategory(data) {
    return request({
        url: '/api/questionCategory',
        method: 'post',
        data
    })
}

// 修改题目分类
export function updateQuestionCategory(data) {
    return request({
        url: '/api/questionCategory',
        method: 'put',
        data
    })
}

// 删除题目分类
export function deleteQuestionCategory(id) {
    return request({
        url: `/api/questionCategory/${id}`,
        method: 'delete'
    })
}